package chanx

import (
	"fmt"
	"sync"
	"time"
)

func PrintStr(wg *sync.WaitGroup, str string, form chan int, to chan int) {
	defer wg.Done()
	for {
		form <- 1
		time.Sleep(200 * time.Millisecond)
		fmt.Println(str)
		<-to
	}
}
